package main

import "fmt"

func xr_check(bs []byte) byte {
	var res byte = 0
	for _, b := range bs {
		res = res ^ b
	}
	return res
}

func main() {
	var pay []byte = []byte{0x4a, 0x58, 0x01, 0x12, 0x34, 0x56, 0x78, 0x12,
		0x34, 0x56, 0x78, 0x01, 0x10, 0x00, 0x18, 0x09,
		0x14, 0x0e, 0x20, 0x36, 0x01, 0x00, 0x9c, 0xa2,
		0xbd, 0x72, 0xd7, 0xb8, 0x32, 0xac, 0x0c}

	fmt.Println(xr_check(pay[2 : len(pay)-1]))

}
